package com.beimin.evedata.model.inv;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class InvControlTowerResourceId implements Serializable {
	private int controlTowerTypeID;
	private int resourceTypeID;

	public int getControlTowerTypeID() {
		return controlTowerTypeID;
	}

	public void setControlTowerTypeID(int controlTowerTypeID) {
		this.controlTowerTypeID = controlTowerTypeID;
	}

	public int getResourceTypeID() {
		return resourceTypeID;
	}

	public void setResourceTypeID(int resourceTypeID) {
		this.resourceTypeID = resourceTypeID;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof InvControlTowerResourceId) {
			InvControlTowerResourceId other = (InvControlTowerResourceId) obj;
			return (other.getControlTowerTypeID() == this.getControlTowerTypeID() && other.getResourceTypeID() == this.getResourceTypeID());
		}
		return false;
	}

	@Override
	public int hashCode() {
		return new String(controlTowerTypeID + "-" + resourceTypeID).hashCode();
	}
}
